/// @tags:
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <unordered_map>

using std::cin;
using std::cout;
using std::endl;

namespace BlueQuantum {

constexpr int maxn = 100;

struct Event {
  int x1, y1, x2, y2;
};

struct Point {
  int dir, dis;  // 0: \ 1: /
  double a;
};

std::unordered_map<int, std::map<int, Point>> xaxis, yaxis;

int main() {
  int m;
  cin >> m;
  for (int i = 1; i <= m; ++i) {
    int opt, x1, y1, x2, y2, k, x, y, d, t;
    double a, I;
    cin >> opt;
    switch (opt) {
      case 1:
        cin >> x1 >> y1 >> x2 >> y2 >> a;
        if (x1 > x2) std::swap(x1, x2), std::swap(y1, y2);
        for (int i = x1, j = y1; i <= x2; ++i, j += (y2 - y1 >= 0 ? 1 : -1)) {
          xaxis[i][j] = Point{y2 - y1 > 0 ? 1 : 0, a};
          yaxis[j][i] = Point{y2 - y1 > 0 ? 1 : 0, a};
        }
        break;

      case 2:
        cin >> k;
        break;

      case 3:
        cin >> x >> y >> d >> I >> t;
        while (t >= 0) {
          if (d == 0) {
            auto &map = yaxis[y];
            auto iter = map.upper_bound(x);
            if (iter != map.end())
          }
        }
        break;
    }
  }
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("External.in", "r", stdin);
  freopen("External.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
